﻿using System;
using System.Collections.Generic;
using System.Text;
using POSPlus.MvcPassiveView;

namespace POSPlus.PrintManager.Core
{
	public delegate void RemoveButtonEventHandler(Object sender, RemoveEventArgs e);
	public delegate void PrintSelectedButtonEventHandler(Object sender, PrintEventArgs e);
	public delegate void PrintAllButtonEventHandler(object sender, PrintEventArgs e);
	public delegate void EditPrintJobEventHandler(string jobName);

	public interface IPrintManagerView
	{
		List<IPrintJob> PrintJobs { set; }
		void RegisterChangeRequestListener<T>(String propertyName, EventHandler<PropertyChangeRequestEventArgs<T>> handler);
		void UnRegisterChangeRequestListener<T>(String propertyName, EventHandler<PropertyChangeRequestEventArgs<T>> handler);
		event RemoveButtonEventHandler RemoveButton;
		event PrintSelectedButtonEventHandler PrintSelected;
		event PrintAllButtonEventHandler PrintAll;
		event EditPrintJobEventHandler EditPrintJob;
	}

	public class RemoveEventArgs : EventArgs
	{
		public List<String> JobNames { get; private set; }
		public RemoveEventArgs(List<String> jobNames)
		{
			JobNames = jobNames;
		}
	}

	public class PrintEventArgs : EventArgs
	{
		public List<String> JobNames { get; private set; }
		public PrintEventArgs(List<String> jobNames)
		{
			JobNames = jobNames;
		}
	}
}
